package com.atguigu.yygh.task.job;

import com.atguigu.yygh.rabbitmq.constant.RabbitMQConstant;
import com.atguigu.yygh.rabbitmq.service.RabbitMQService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @Author:hx
 * @DateTime:2022/11/21 13:41
 * @Description:
 */
@Component
public class RemindPatientJob {

    @Autowired
    private RabbitMQService rabbitMQService;

    @Scheduled(cron = "0 0 8 * * ? ")
    public void remindMessage(){
        rabbitMQService.sendMessage(RabbitMQConstant.EXCHANGE_DIRECT_TASK,RabbitMQConstant.ROUTING_TASK,"");
    }
}
